#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")"

GOOGLE_MAPS_INSTALL_LOCATION=$1

if [[ -z "$GOOGLE_MAPS_INSTALL_LOCATION" ]]; then
  echo "usage: enable-google-maps <google-frameworks-relative-install-dir>"
  exit 1
fi

cat > lib/ios/User.xcconfig <<EOF
FRAMEWORK_SEARCH_PATHS = \$(inherited) \$(SRCROOT)/../../../../$GOOGLE_MAPS_INSTALL_LOCATION
GCC_PREPROCESSOR_DEFINITIONS = \$(inherited) HAVE_GOOGLE_MAPS=1
EOF
